package com.xw.mailservice.task;


import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 发送邮件任务类
 * @author YangJianquan
 */
@Component
public class SendMailTask {
	/*@Autowired
	private MailService mailService;
	@Resource
	private MailService iMailService;*/
	
	/**
	 * 发送等待发送的邮件
	 */
	@Scheduled(fixedDelay=100)
	public void sendMailTask(){
		/*SendingMail mail = cacheService.pollSendMailQueue();
		if(mail != null){
			log.info("start sending mails ...");
			try {
				iMailService.sendMail(mail.getFromUser(), mail);
			} catch (MessagingException e) {
				log.error("sending mail failed ...",e);
			}
		}*/
	}
}
